#include <iostream>
#include <vector>
#include <limits>

int main() {
    std::vector<int> numbers = {5, 3, 8, 1, 9, 2}; // 示例数组，您可以根据需要更改数组内容
    int sum = 0;
    int max_value = std::numeric_limits<int>::min();
    int min_value = std::numeric_limits<int>::max();

    for (int num : numbers) {
        sum += num;
        if (num > max_value) {
            max_value = num;
        }
        if (num < min_value) {
            min_value = num;
        }
    }

    double average = static_cast<double>(sum) / numbers.size();

    std::cout << "数组的最大值是: " << max_value << std::endl;
    std::cout << "数组的最小值是: " << min_value << std::endl;
    std::cout << "数组的和是: " << sum << std::endl;
    std::cout << "数组的平均值是: " << average << std::endl;

    return 0;
}
